 <!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>广告分类管理</title> 

    <link rel="shortcut icon" href="/favicon.ico"> 
    <link href="/public/admin/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/public/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/admin/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/public/admin/css/animate.css" rel="stylesheet">
    <link href="/public/admin/css/style.css?v=4.0.0" rel="stylesheet"><base target="_blank">
    <link href="/public/admin/js/plugins/layer/skin/layer.css" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content">
        
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>广告分类管理</h5>
                        <div class="ibox-tools" style="display:none;">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="table_basic.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="table_basic.html#">选项1</a>
                                </li>
                                <li><a href="table_basic.html#">选项2</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="panel-body">
                                <a onclick="showAddRow()" href="javascript:;" class="btn btn-primary"><i class="fa fa-plus"></i>添加</a>
                                <a onclick="window.location.href=location.href;" href="javascript:;" class="btn btn-primary"><i class="glyphicon glyphicon-refresh"></i>刷新</a>
                            </div> 
                            <div class="col-sm-12">
                            <form name="listAdsCategoryForm" id="listAdsCategoryForm" method="post" onsubmit="return false">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr>
                                            <th>ID</th>
                                            <th>广告分类名称</th>
                                            <th>排序</th>
                                            <th>分类说明</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    {if empty($adsList)}
                                    <tr><td colspan="5" style="text-align:center;">暂无数据</td></tr>
                                    {else/}
                                    {foreach name="adsList" item="list" key="key"}
                                        <tr id="row_{$list.id}"> 
                                            <td>
                                                <div class="rt-editpanel">{$list.id}</div>
                                                <div class="rt-savepanel hidden">
                                                    {$list.id}
                                                    <input type="hidden" name="id" id="Id_{$list.id}" value="{$list.id}" class="rt-edit" />
                                                 </div>
                                            </td>
                                            <td>
                                                <div class="rt-editpanel">{$list.kind_name}</div>
                                                <div class="rt-savepanel hidden">
                                                    <input type="text" name="kind_name" id="kind_name_{$list.id}" value="{$list.kind_name}" class="form-control rt-edit" />
                                                 </div>
                                            </td>
                                            <td>
                                                <div class="rt-editpanel">{$list.sort_order}</div>
                                                <div class="rt-savepanel hidden">
                                                    <input type="text" name="sort_order" id="sort_order_{$list.id}" value="{$list.sort_order}" class="form-control rt-edit" />
                                                 </div>
                                            </td>
                                            <td>
                                                <div class="rt-editpanel">{$list.kind_info}</div>
                                                <div class="rt-savepanel hidden">
                                                    <input type="text" name="kind_info" id="kind_info_{$list.id}" value="{$list.kind_info}" class="form-control rt-edit" />
                                                 </div>
                                            </td> 
                                            <td>
                                                <div class="rt-editpanel">
                                                    <a href="javascript:;" class="btn btn-xs btn-primary" title="编辑" onclick="showEdit({$list.id})"><i class="fa fa-edit"></i> 编辑</a>
                                                    <a href="javascript:;" class="btn btn-xs btn-danger" title="删除" onclick="doDel('/index.php/Admin/Other/DelAdsKind',{$list.id});"><i class="fa fa-close"></i> 删除</a>
                                                </div>
                                                <div class="rt-savepanel hidden">
                                                    <a href="javascript:;" class="btn btn-xs btn-success" title="保存" onclick="doEdit('listAdsCategoryForm', '/index.php/Admin/Other/EditAdsKind',{$list.id})"><i class="fa fa-save"></i> 保存</a>
                                                    <a href="javascript:;" class="btn btn-xs btn-default" title="取消" onclick="cancelEdit({$list.id});"><i class="fa fa-mail-reply"></i> 取消</a>
                                                </div>
                                            </td>
                                        </tr>
                                    {/foreach}
                                    {/if}
                                        <tr id="addnew" class="hidden">
                                            <td>
                                                <span class="text-primary">新增</span>
                                            </td>
                                            <td><input name="kind_name" id="kind_name" type="text" class="form-control addnew" placeholder="请输入类别名称" required maxlength="100" /></td>
                                            <td class="text-center"><input type="number" name="sort_order" id="sort_order" class="form-control addnew" value="0" maxlength="3" placeholder="请输入类别排序，只能填写数字" /></td>
                                            <td><input type="text" name="kind_info" id="kind_info" class="form-control addnew" placeholder="类别简介，非必填" maxlength="200" /></td>
                                            <td>
                                                <button type="button" class="btn btn-xs btn-success" title="保存" onclick="doAdd('listAdsCategoryForm', '/index.php/Admin/Other/addAdsKind');"><i class="fa fa-save"></i> 保存</button>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </form>
                            </div>
                        </div> 

                    </div>
                </div>
            </div>

        </div>
    </div>
<div id="addAdskind" style="display:none;">
    123
</div>
    <!-- 全局js -->
    <script src="/public/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/admin/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/public/admin/js/plugins/layer/layer.min.js"></script>
    <script src="/public/admin/js/jquery-form.js"></script>
    <!-- 自定义js -->
    <script src="/public/admin/js/content.js?v=1.0.0"></script>
    <script src="/public/admin/js/article.js"></script>
    <!-- iCheck -->
    <script src="/public/admin/js/plugins/iCheck/icheck.min.js"></script>

    <script>
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
    </script>

    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
    <!--统计代码，可删除-->

</body>

</html>